package com.tom.angel.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "angel_user")
public class User {

	/**
	 * 用户编号
	 */
	private int userId;

	/**
	 * 用户注册名
	 */
	private String userName;

	/**
	 * 用户昵称
	 */
	private String userNickName;

	/**
	 * 用户密码
	 */
	private String userPass;

	/**
	 * 用户生日
	 */
	private Date userBirthday;

	/**
	 * 用户地址
	 */
	private String userAddress;

	/**
	 * 用户个性签名
	 */
	private String personalizedSignature;

	/**
	 * 用户手机
	 */
	private String userPhone;

	/**
	 * 用户邮箱
	 */
	private String userMail;

	/**
	 * 用户性别
	 */
	private String userSex;

	/**
	 * 用户密保
	 */
	private Question question ;

	/**
	 * 用户答案
	 */
	private String ansower;

	@Column(name = "userName")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "userNickName")
	public String getUserNickName() {
		return userNickName;
	}

	public void setUserNickName(String userNickName) {
		this.userNickName = userNickName;
	}

	@Column(name = "userPass")
	public String getUserPass() {
		return userPass;
	}

	public void setUserPass(String userPass) {
		this.userPass = userPass;
	}

	@Column(name = "userBirthday")
	public Date getUserBirthday() {
		return userBirthday;
	}

	public void setUserBirthday(Date userBirthday) {
		this.userBirthday = userBirthday;
	}

	@Column(name = "userAddress")
	public String getUserAddress() {
		return userAddress;
	}

	public void setUserAddress(String userAddress) {
		this.userAddress = userAddress;
	}

	@Column(name = "personalizedSignature")
	public String getPersonalizedSignature() {
		return personalizedSignature;
	}

	public void setPersonalizedSignature(String personalizedSignature) {
		this.personalizedSignature = personalizedSignature;
	}

	@Column(name = "userPhone")
	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	@Column(name = "userMail")
	public String getUserMail() {
		return userMail;
	}

	public void setUserMail(String userMail) {
		this.userMail = userMail;
	}

	@Column(name = "userSex")
	public String getUserSex() {
		return userSex;
	}

	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}

	@Column(name = "ansower")
	public String getAnsower() {
		return ansower;
	}

	public void setAnsower(String ansower) {
		this.ansower = ansower;
	}

	@Id
	@GeneratedValue
	@Column(name = "userId", nullable = false)
	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="questionId")
	public Question getQuestion() {
		return question;
	}

	public void setQuestion(Question question) {
		this.question = question;
	}
}
